@extends('welcome')
@section('zhong_content')
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/baidu/lang/zh-cn/zh-cn.js"></script>
	<center>
	<form action="{{url('/home/comment/add')}}" method="post">
    <script id="editor" name="content" type="text/plain" placeholder="请输入4~30个字符" style="width:524px;height:150px;"></script>
	<div style="height:20px"></div>
	<input type="hidden" name="dingdan_id" value="{{$dingdan_id}}">
    <button style="width:80px;">评论</button>
    {{csrf_field()}}
    </form>
	</center>
<script type="text/javascript">
	//实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor',{
    	toolbars: [
		    ['fullscreen', 'source', 'undo', 'redo'],
		    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
		]
    });
</script>
@endsection